package BAKERY;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * CusOrder.java
 *
 * Created on Oct 14, 2010, 12:15:16 PM
 */


/**
 *
 * @author peichia
 */
public class OrderList extends javax.swing.JFrame {

    /** Creates new form CusOrder */
    public OrderList() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
    private void initComponents() {

        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jLabel1 = new javax.swing.JLabel();
        takeOrder = new javax.swing.JButton();
        cancelOrder = new javax.swing.JButton();
        back = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setMinimumSize(new java.awt.Dimension(480, 350));
        getContentPane().setLayout(null);

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null}
            },
            new String [] {
                "Cake Description", "Customer Name", "Amount Left"
            }
        ));
        jScrollPane1.setViewportView(jTable1);

        getContentPane().add(jScrollPane1);
        jScrollPane1.setBounds(40, 50, 390, 140);

        jLabel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Customer Special Order", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Dialog", 1, 14), new java.awt.Color(53, 53, 58))); // NOI18N
        getContentPane().add(jLabel1);
        jLabel1.setBounds(20, 20, 430, 190);

        takeOrder.setText("Take Order");
        takeOrder.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                takeOrderActionPerformed(evt);
            }
        });
        getContentPane().add(takeOrder);
        takeOrder.setBounds(150, 230, 130, 27);

        cancelOrder.setText("Cancel Order");
        getContentPane().add(cancelOrder);
        cancelOrder.setBounds(290, 230, 130, 27);

        back.setText("Back");
        back.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                backActionPerformed(evt);
            }
        });
        getContentPane().add(back);
        back.setBounds(40, 230, 90, 27);

        pack();
    }// </editor-fold>                        

    private void backActionPerformed(java.awt.event.ActionEvent evt) {                                     
       this.setVisible(false);
       new Main().setVisible(true); // TODO add your handling code here:
    }                                    

    private void takeOrderActionPerformed(java.awt.event.ActionEvent evt) {                                          
        this.setVisible(false);
       new payingMethod().setVisible(true);// TODO add your handling code here:
    }                                         

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new OrderList().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify                     
    private javax.swing.JButton back;
    private javax.swing.JButton cancelOrder;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    private javax.swing.JButton takeOrder;
    // End of variables declaration                   

}
